package org.lemma.set;

import javax.annotation.Author;
import javax.annotation.Copyright;
import javax.annotation.Version;
import org.lemma.number.Numeric;


/**
 * <p>
 *  TODO: Javadoc for {@code Relation}
 * </p>
 *
 * @author Chris Beatty [christopher.beatty@gmail.com]
 * @param <D> The object type for the domain
 * @param <C> The object type for the codomain
 * @version 1.0.0
 */
@Version(
    major   = "1",
    minor   = "0",
    patch   = "0",
    date    = "2006-10-10T12:00:00-5:00",
    authors = { @Author(name = "Chris Beatty", email = "christopher.beatty@gmail.com") }
)
@Copyright
public interface Relation<D, C, M extends Numeric> extends Set<Tuple<D,C>, M> {
    
    /**
     * 
     * @param element
     * @return
     */
    public Set<C,M> relate(final D element);

    /**
     * 
     * @param <S>
     * @param g
     * @return
     */
    public <S> Relation<D,S,M> compose(final Relation<C,S,M> g);

}
